home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / WINDOWS / CLIPST.ARJ / CURSOR.H < prev    next >
C/C++ Source or Header  |  1992-02-18  |  710b  |  45 lines

  1. // cursor.h RHS 2/15/92
  2.  
  3. #if !defined(CURSOR_H)
  4. #define CURSOR_H
  5.  
  6. #include<windows.h>
  7.  
  8.  
  9. enum { ARROW, WAIT };
  10.  
  11. class Cursor
  12.     {
  13.     HCURSOR hArrow;
  14.     HCURSOR hWait;
  15.  
  16. public:
  17.     Cursor(void)
  18.         {
  19.         hArrow = hWait = 0;
  20.         }
  21.     void operator()(WORD);
  22.     };
  23.  
  24. void Cursor::operator()(WORD w)
  25.     {
  26.  
  27.     switch(w)
  28.         {
  29.         case ARROW:
  30.             {
  31.             if(!hArrow)
  32.                 hArrow = LoadCursor(NULL, IDC_ARROW);
  33.             SetCursor(hArrow);
  34.             break;
  35.         case WAIT:
  36.             if(!hWait)
  37.                 hWait = LoadCursor(NULL, IDC_WAIT);
  38.             SetCursor(hWait);
  39.             }
  40.         }
  41.     }
  42.  
  43. #endif
  44.  
  45.